# 完善代码。需要将当前项目的路径添加到 python 路径中
import sys
sys.path.append("D:\\01_post_graduate_learning\\python_progect_for_zhibo")

import time

from basic_algorithm.sort_algorithm.helper.array_helper import *
from basic_algorithm.sort_algorithm.insert_sort.insert_sort import *

# 测试搭建
length = 100000
array = generate_random_array(length=length)

# array length = 10000 and the program executed 4.537522554397583 s
# 100000数量级的时候算法执行的很慢

# print(array)
# 排序算法
start_time = time.time()
insert_sort1(array)
print(f"array length = {length} and the program executed {time.time() - start_time} s")
# print(array)
# 测试排序算法结果
print(check_correct(array))

